/********************************************************************************
 *      Copyright:  (C) 2022 Li Yanting<liyanting2@163.com>
 *                  All rights reserved.
 *
 *       Filename:  main.h
 *    Description:  This head file 
 *
 *        Version:  1.0.0(04/20/2022)
 *         Author:  Li Yanting <liyanting2@163.com>
 *      ChangeLog:  1, Release initial version on "04/20/2022 04:48:46 PM"
 *                 
 ********************************************************************************/

#ifndef _MAIN_H_
#define _MAIN_H_

#include <stdio.h>
#include <getopt.h>
#include <stdlib.h>
#include <sys/epoll.h>
#include <signal.h>
#include <sqlite3.h>

#include "server_sqlite.h"
#include "server_socket.h"
#include "logger.h"

#define MAX_EVENT 1024

#define CONFIG_DEBUG
#ifdef CONFIG_DEBUG
#define dbg_printf(format, args...) printf(format, ##args)
#else
#define dbg_printf(format, args...) do{} while(0)
#endif

static inline void print_usage(char *progname);
void program_stop(int signum);

int g_program_stop = 0;

#endif
